import {Http} from "../utils/http"

class Goods {

    async getHotGoods() {
        return await Http.request({
            url: `home/getHotGoodsList`
        });
    }

    async getNewGoods() {
        return await Http.request({
            url: `home/getNewGoodsList`
        });
    }

    async getBannerList() {
        return await Http.request({
            url: `home/getBannerList`
        });
    }

    async getDetail(id) {
        return await Http.request({
            url: `goods/detail/` + id
        })
    }

    async collect(id) {
        return await Http.request({
                url: `collect/handleCollect`,
                method: 'post',
                data: {
                    goodsId: id
                }
        })
    }
}

export {
    Goods
}